import request from '@/utils/request'

// 查询采购详情列表
export function listCaigouDetail(query) {
  return request({
    url: '/business/caigouDetail/list',
    method: 'get',
    params: query
  })
}
// 查询采购详情列表全部
export function getListCaigouDetail(query) {
  return request({
    url: '/business/caigouDetail/getListAll',
    method: 'get',
    params: query
  })
}


// 查询采购详情详细
export function getCaigouDetail(id) {
  return request({
    url: '/business/caigouDetail/' + id,
    method: 'get'
  })
}

// 新增采购详情
export function addCaigouDetail(data) {
  return request({
    url: '/business/caigouDetail',
    method: 'post',
    data: data
  })
}

// 修改采购详情
export function updateCaigouDetail(data) {
  return request({
    url: '/business/caigouDetail',
    method: 'put',
    data: data
  })
}
export function addCaigoItemInfo(id) {
  return request({
    url: '/business/caigouDetail/addCaigoItemInfo/' + id,
    method: 'get'
  })
}
// 删除采购详情
export function delCaigouDetail(id) {
  return request({
    url: '/business/caigouDetail/' + id,
    method: 'delete'
  })
}
